package com.wdcg;

import java.util.ArrayList;

import com.wdcg.model.access.BonusAccess;
import com.wdcg.model.access.DwarfAccess;
import com.wdcg.model.dao.BonusDescription;
import com.wdcg.model.dao.DwarfDescription;
import com.wdcg.model.dbhelper.DatabaseHelper;

import android.app.Activity;
import android.app.Application;
import android.content.SharedPreferences;
import android.util.Log;


public class WrocloveDwarvesCityGameApplication extends Application{
	
	
	public void onCreate() {
		super.onCreate();
		ApplicationSharedPreferences.init(getApplicationContext());
		initializeDataBase();		
	};
	
	void initializeDataBase(){
		DatabaseHelper.initializeMainDBHelper(super.getApplicationContext());
		DatabaseHelper db = DatabaseHelper.getMainDBHelper();
		

		if (!ApplicationSharedPreferences.isDatabaseCreated()) {
			db.createDatabaseFromCopy();
			ApplicationSharedPreferences.setDatabaseIsCreated();
		}
	}
}
